package com.jrx.anytxn.transaction.dto.payment;

import com.jrx.anytxn.transaction.bean.PaymentLoanInfoBean;
import com.jrx.anytxn.transaction.dto.common.CommonReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.List;

/**
 *  还款请求实体
 * @author  haopu.zheng
 * date  2019/8/9
 **/
@ApiModel(value = "还款请求实体", description = "还款返回实体")
public class PaymentReq extends CommonReq {

    /**
     * 订单信息
     */
    @ApiModelProperty(value = "订单信息" ,required = true)
    @NotNull
    @Size(max=32, message = "订单号不能超过32位")
    @Size(min=1)
    private List<PaymentLoanInfoBean> loanList;

    /**
     * 还款类型
     */
    @ApiModelProperty(value = "还款类型 0：代扣 从客户卡上扣款;1：代还 从平台账户扣款",required = true)
    @NotBlank(message="还款类型不可空")
    @Pattern(regexp = "^0|1$" ,message = "还款类型 只能是0或1")
    private String paymentType;
    /**
     * 卡号
     */
    @ApiModelProperty(value = "卡号")
    @Size(max=32, message = "卡号不能超过32位")
    private String cardNumber;

    public String getPaymentType() {
        return paymentType;
    }

    public void setPaymentType(String paymentType) {
        this.paymentType = paymentType;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public List<PaymentLoanInfoBean> getLoanList() {
        return loanList;
    }

    public void setLoanList(List<PaymentLoanInfoBean> loanList) {
        this.loanList = loanList;
    }
}
